<script setup>
import {auditApproved} from "@/api/contract/processContract.js";
import {backProcessConList} from "@/utils/backList.js";
import FlowInfoView from "@/views/contract/process/processing/flowInfo/common/flowInfoView.vue";

const {proxy} = getCurrentInstance()
const prop = defineProps({
  conId: {
    type: Number
  },
  flowInfoButtons: {
    type: JSON
  },
  isRefreshActivityNote: {
    type: Boolean,
  }
})
const openFileUrl = '/contract/processing/audit/openFile/' + prop.conId

function handleApproved() {
  proxy.$modal.confirmAndExecuteJS('确认已审核完毕？', auditApproved, prop.conId, backProcessConList)
}

</script>

<template>
  <FlowInfoView :conId="conId" :openFileUrl="openFileUrl" :isBack="flowInfoButtons.isBack" :isRefreshActivityNote="isRefreshActivityNote">
    <el-button type="success" @click="handleApproved" v-if="flowInfoButtons.isAudit">已审核</el-button>
  </FlowInfoView>
</template>

